from time import sleep


# from libs.yuntongxun.sms import CCP

from celery_tasks.main import celery
# 通过添加装饰器, 把函数声明为celery的一个任务


@celery.task(name='send_sms_code')
def send_sms_code(mobile, sms_code):
    """获取短信验证码"""
    # CCP().send_template_sms(mobile, [sms_code, 5], 1)
    sleep(5)
    print('发送短信验证码', sms_code)
